<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="../../lib/html5shiv.js?rev=@@hash"></script>
    <script type="text/javascript" src="../../lib/respond.min.js?rev=@@hash"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="../../static/h-ui/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../static/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="../../lib/Hui-iconfont/1.0.8/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="../../static/h-ui.admin/skin/default/skin.css" id="skin"/>
    <link rel="stylesheet" type="text/css" href="../../static/h-ui.admin/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../ht-css/Project.css"/>
    <!--引入分页-->
    <link rel="stylesheet" href="../../lib/pagination/pagination.css">
    <!--[if IE 6]>
    <script type="text/javascript" src="../../lib/DD_belatedPNG_0.0.8a-min.js?rev=@@hash"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="../../ht-css/style-q.css"/>
    <title>操作日志</title>
</head>

<body>
<nav class="breadcrumb">商品管理 <span class="c-gray en">&gt;</span> 分类/品牌设置 <span class="c-gray en">&gt;</span> 分类管理 <span
        class="c-gray en">&gt;</span> 操作日志
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<article class="page-container">
    <div class="HuiTab">
        <div class="bk-gray bg-1 pd-20">
            <div class="va-m lh-20 f-16 pb-15">
                <strong>操作日志</strong>
            </div>
            <div class="line"></div>
            <div class="dotted pt-10 pl-10" id="logBox">
                <p class="f-18"><strong>操作人：<span>whwe</span></strong></p>
                <p>2017-10-07 11:37:23</p>
                <p>日志内容：<span>增加一级分类钢材</span></p>
            </div>
        </div>
        <div class="dataTables_wrapper goods_fanye clearfix">
            <div class="f-r pageturning M-box3"></div>
        </div>
    </div>
</article>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="../../lib/jquery/1.9.1/jquery.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/layer/2.4/layer.js?rev=@@hash"></script>
<script type="text/javascript" src="../../static/h-ui/js/H-ui.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../static/h-ui.admin/js/H-ui.admin.js?rev=@@hash"></script>
<!--/_footer 作为公共模版分离出去-->
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="../../lib/My97DatePicker/4.8/WdatePicker.js?rev=@@hash"></script>
<!--表单验证-->
<script type="text/javascript" src="../../lib/jquery.validation/1.14.0/jquery.validate.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/jquery.validation/1.14.0/validate-methods.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/jquery.validation/1.14.0/messages_zh.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/datatables/1.10.0/jquery.dataTables.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/laypage/1.2/laypage.js?rev=@@hash"></script>
<script src="../../lib/pagination/jquery.pagination.js?rev=@@hash"></script>
<script src="../../ht-js/public.js?rev=@@hash"></script>
<!--验证token-->
<script src="../../ht-js/verifyToken.js?rev=@@hash"></script>
<script src="../../ht-js/Project.js?rev=@@hash"></script>
<script>
    jQuery.Huitab = function (tabBar, tabCon, class_name, tabEvent, i) {
        var $tab_menu = $(tabBar);
        // 初始化操作
        $tab_menu.removeClass(class_name);
        $(tabBar).eq(i).addClass(class_name);
        $(tabCon).hide();
        $(tabCon).eq(i).show();

        $tab_menu.bind(tabEvent, function () {
            $tab_menu.removeClass(class_name);
            $(this).addClass(class_name);
            var index = $tab_menu.index(this);
            $(tabCon).hide();
            $(tabCon).eq(index).show()
        })
    }
</script>
<script>
    $(document).ready(function () {
        //ajax请求
        $.ajax({
            contentType: 'application/json',
            //root.goodsInter.goods_getLogList
            url: root.goodsInter.goods_getLogList,
            cache: false, //禁用缓存
            type: "POST",
            data: JSON.stringify({
                "nowPage":1,
                "pageSize":100,
                "model":{
                    "type":"1"
                }
            }),
            success: function (data) {
                console.log(data.data.list);
                if (data.data.list.length == 0) {
                    $.Huimodalalert("没有返回的数据", 3000);
                    return;
                }
                var listjson = data.data.list;
                $("#logBox").html();
                var logStr = "";
                for (var i = 0; i < listjson.length; i++) {
                    if (listjson[i].excutor == "" || listjson[i].excutor == null) {
                        listjson[i].excutor = "暂无操作人";
                    }
                    if (listjson[i].excute_time == "" || listjson[i].excute_time == null) {
                        listjson[i].excute_time = "暂无操作时间";
                    }
                    if (listjson[i].content == "" || listjson[i].content == null) {
                        listjson[i].content = "暂无操作内容";
                    }
                    logStr += "<p class=\"f-18\"><strong>操作人：<span>" + listjson[i].excutor + "</span></strong></p><p>" + listjson[i].excute_time + "</p><p>日志内容：<span>" + listjson[i].content + "</span></p>"
                }
                $("#logBox").html(logStr);
                $('.M-box3').pagination({
                    pageCount: data.data.totalPage,//总页数
                    jump: true,
                    coping: true,
                    prevContent: '上页',
                    nextContent: '下页',
                    callback: function (api) {
                        console.log(api.getCurrent());
                        $.ajax({
                            contentType: 'application/json',
                            url: root.goodsInter.goods_getLogList,
                            cache: false, //禁用缓存
                            type: "POST",
                            data: JSON.stringify({
                                "nowPage":api.getCurrent(),
                                "pageSize":100,
                                "model":{
                                    "type":"1"
                                }
                            }),
                            success: function (data) {
                                console.log(data.data.list);
                                var listjson = data.data.list;
                                $("#logBox").html();
                                var logStr = "";
                                for (var i = 0; i < listjson.length; i++) {
                                    if (listjson[i].excutor == "" || listjson[i].excutor == 'null') {
                                        listjson[i].excutor = "操作人暂无";
                                    }
                                    if (listjson[i].excute_time == "" || listjson[i].excute_time == 'null') {
                                        listjson[i].excute_time = "操作时间暂无";
                                    }
                                    if (listjson[i].content == "" || listjson[i].content == 'null') {
                                        listjson[i].content = "日志内容暂无";
                                    }
                                    logStr += "<p class=\"f-18\"><strong>操作人：<span>" + listjson[i].excutor + "</span></strong></p><p>" + listjson[i].excute_time + "</p><p>日志内容：<span>" + listjson[i].content + "</span></p>"
                                }
                                $("#logBox").html(logStr);
                            }
                        });
                    }
                });
            }
        });
    });
</script>
</body>

</html>